const events = require("events");
const eventEmitter = new events.EventEmitter();
const Double = function (number) {
  eventEmitter.emit("log", number);
};
eventEmitter.on("log", (number) => {
  console.log();
});

function log(num) {
  console.log(num);
}
